﻿using System;
using System.Collections.ObjectModel;

namespace RestService.Models
{

    //Aktualny status playera
    //Klinet wysyła do serwisu swoje aktualne współrzędne i informacje czy ma flagę
    [Serializable]
    public class newPlayerStatus
    {
        private float _latitude;
        private float _longitude;
        private bool _hasFlag;

        public float Latitude { get; set; }
        public float Longitude { get; set; }
        public bool HasFlag { get; set; }

        public newPlayerStatus(float a, float b)
        {
            _latitude = a;
            _longitude = b;
            _hasFlag = false;
        }
    }

    public static class LocalizationPoints
    {
        private static ObservableCollection<PlayerStatus> _playersPoints;

        public static ObservableCollection<PlayerStatus> PlayersPoints
        {
            get { return _playersPoints; }
            set { _playersPoints = value; }
        }

        static LocalizationPoints()
        {
            _playersPoints = new ObservableCollection<PlayerStatus>();
        }

        static void AddPoint(PlayerStatus point)
        {
            if(_playersPoints != null)
                _playersPoints.Add(point);
        }
    }
}